﻿#ifndef VIDEODEALTHREAD_H
#define VIDEODEALTHREAD_H

#include <QThread>

class VideoDealThread : public QThread
{
    Q_OBJECT
public:
    explicit VideoDealThread(const QString & filename, const QString &output_dir,
                             unsigned long long core, QObject *parent = nullptr);
    ~VideoDealThread();

    void run();
    int get_frame_time() {return frame_time;}
    unsigned long long get_core() {return core_;}

    const QString word = "齉邈瞄貅国苗田王土三二丄亠一；、";

private:
    QString filename_;
    QString output_dir_;

    int frame_time;
    int ok_count;  // 用于统计运算进度
    unsigned long long core_;  // 进行运算的cpu编号

signals:
    void file_empty_error();
    void file_not_exist_error(QString filename);
    void deal_ok();
    void change_jin_du(int jin_du);
};

#endif // VIDEODEALTHREAD_H
